



function resizeShowDivIndex(id,mask){
	
	var xScroll = $(window.parent.document.body).width();
	var yScroll = $(window.parent.document.body).height();
	var windowWidth = $(window.parent).width();
	var windowHeight = $(window.parent).height();

	var t = (windowHeight - parseInt($(id).find("div:first").height() + 100))/2;
	var l = (windowWidth - parseInt($(id).find("div:first").width()))/2;

	$(mask).css({				
		height: (yScroll > windowHeight) ? yScroll : windowHeight,
		width: (xScroll > windowWidth) ? xScroll : windowWidth
	});

	$(id).find("div:first").css({
		top : t,
		left: l
	});

}

function regFun(){
	$("#REG_MAIN_DIV").show(0);
	resizeShowDivIndex("#REG_MAIN_DIV", ".mask");
	$(window.parent.document).find("body").append($("#REG_MAIN_DIV").clone());
	$("#REG_MAIN_DIV").hide(0);
	
	
}

